<<<<<<< HEAD
package com.project.housesalesystem.controller;
/*
 *   房源类别
 */

import com.project.housesalesystem.bean.Category;
import com.project.housesalesystem.bean.Users;
import com.project.housesalesystem.common.Results;
import com.project.housesalesystem.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("admin")
@RestController
public class CategoryController {

    @Autowired
    private CategoryService categoryService;
    /*
     * 查询所有分类信息
     */
    @GetMapping("/selectAll")
    public Results selectAll() {
        List<Category> list = categoryService.list();
        return Results.ok().put("data", list);
    }

}
=======
package com.project.housesalesystem.controller;
/*
 *   房源类别
 */

import com.project.housesalesystem.bean.Category;
import com.project.housesalesystem.bean.Users;
import com.project.housesalesystem.common.Results;
import com.project.housesalesystem.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("admin")
@RestController
public class CategoryController {

    @Autowired
    private CategoryService categoryService;
    /*
     * 查询所有分类信息
     */
    @GetMapping("/selectAll")
    public Results selectAll() {
        List<Category> list = categoryService.list();
        return Results.ok().put("data", list);
    }

}
>>>>>>> 66dcee4e153c16ef05fd0c7e1ed9f414a0bf0bc9
